<template>
  <div id="app">
    <van-nav-bar title="阿珍爱上了阿强" left-text="返回" left-arrow />

    <transition enter-active-class="fadeInRight" leave-active-class="fadeOutLeft">
      <router-view class="animated"/>
    </transition>
    <van-tabbar v-model="active">
      <van-tabbar-item icon="wap-home" to="/home">主页</van-tabbar-item>
      <van-tabbar-item icon="points"  to="/member">会员</van-tabbar-item>
      <van-tabbar-item icon="cart" info="5" to="/cart">购物车</van-tabbar-item>
      <van-tabbar-item icon="aim" to="/search">搜索</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
  name: "App",
  data: () => ({
    active: 0
  }),
  methods: {}
};
</script>

<style scoped>
#app {
  /* 横向自动宽度 */
  overflow-x: auto;
  /* 隐藏动画的时候出现滚动条 */
  overflow: hidden;
}
.v-leave-to {
  position: absolute;
}
</style>
